export interface IProps {
  global: any;
  buttonPermissions: any;
  powerForecast: any;
  menuCode: string;
  currentUser?: any;
}
export interface IOptionType {
  label?: string;
  value?: string | number;
  children?: IOptionType[];
}

export enum ITitleType {
  IMPORT_VIDEO = 'importVideo', // 导入视频
  IMPORT_FILE = 'importFile', // 导入文件
}

export enum IOperateType {
  CREATE = 'create', // 发布
  UPDATE = 'update', // 编辑
  REMOVE = 'remove', // 删除
}

export enum ILogType {
  INFO = 'INFO', //资料
  FQA = 'FQA', // 问题
}

export enum ISystemHelpCenterPermissions {
  SystemHelpCenterSaveButton = 'SystemHelpCenterSaveButton', // 系统操作资料管理-导入
  SystemHelpCenterReSaveButton = 'SystemHelpCenterReSaveButton', // 系统操作资料管理-重新上传
  SystemHelpCenterRemoveButton = 'SystemHelpCenterRemoveButton', // 系统操作资料管理-删除
  SystemHelpCenterSaveFQAButton = 'SystemHelpCenterSaveFQAButton', //常见问题I(FQA)管理-新增
  SystemHelpCenterImportFQAButton = 'SystemHelpCenterImportFQAButton', //常见问题I(FQA)管理-导入
  SystemHelpCenterEditFQAButton = 'SystemHelpCenterEditFQAButton', //常见问题I(FQA)管理-编辑
  SystemHelpCenterRemoveFQAButton = 'SystemHelpCenterRemoveFQAButton', //常见问题I(FQA)管理-删除
}

export enum IFileType {
  VIDEO = 1, // 视频
  PDF = 2, // PDF
}

// 操作类型
export enum IOperationType {
  ADD = '1', // 新增
  EDIT = '2', // 编辑
  DETELE = '3', // 删除
}

export interface IOperationLogDataType {
  total?: number;
  size?: number;
  current?: number;
  records?: IOperationLogDataListType[];
}

export interface IOperationLogDataListType {
  createTime?: string;
  firstMenuName?: string;
  secondMenuName?: string;
  tabMenuName?: string;
  operateType?: IOperateType;
  creatorName?: string;
  type?: ILogType;
  titles?: string[];
  title?: string;
  id?: number;
  isSpread?: boolean;
}
export interface IQueryPagePublishInfoParamsType {
  current?: number;
  size?: number;
  firstMenuIdList?: string[];
  secondMenuIdList?: string[];
  tabMenuIdList?: string[];
}

export interface ITabMenuListType {
  firstMenuId?: string;
  name?: string;
  infoList?: IPublishInfoDataType[];
  secondMenuList?: {
    name?: string;
    secondMenuId?: string;
    infoList?: IPublishInfoDataType[];
    tabMenuList?: {
      modifyTime?: string;
      rank?: number;
      secondMenuId?: string;
      tabMenuId?: string;
      tabMenuName?: string;
      infoList?: IPublishInfoDataType[];
    }[];
  }[];
}

export interface IPublishInfoDataType {
  id?: number; //ID
  firstMenuId?: string; //一级菜单ID
  firstMenuName?: string; //一级菜单名称
  secondMenuId?: string; //二级菜单ID
  secondMenuName?: string; //二级菜单名称
  tabMenuId?: string; //tab菜单ID
  tabMenuName?: string; //tab菜单名称
  fileId?: string; //已上传的文件ID
  fileName?: string; //文件名称
  fileType?: IFileType; // 文件类型
  filePath?: string; // 文件路径
  fileSize?: number; //文件大小
  creatorId?: number; //创建人ID
  creatorName?: string; //创建人姓名
  modifyId?: number; //修改人ID
  modifyName?: string; //修改人姓名
  createTime?: string; //创建时间
  modifyTime?: string; //修改时间
  rank?: number; //顺序号
}

export interface IPublishInfoParamsType {
  fileList: [
    {
      fileId?: string; //已上传的文件ID
      fileName?: string; //文件名称
      fileType?: IFileType; // 文件类型
      filePath?: string; // 文件路径
      fileSize?: number; //文件大小
    },
  ];
  firstMenuId?: string; //一级菜单ID
  firstMenuName?: string; //一级菜单名称
  secondMenuId?: string; //二级菜单ID
  secondMenuName?: string; //二级菜单名称
  tabMenuId?: string; //tab菜单ID
  tabMenuName?: string; //tab菜单名称
}

export interface IQueryFQAParamsType {
  current: number;
  keywords?: string;
  size: number;
}

export interface IPublishFQADataType {
  id?: number;
  content?: string;
  rank?: number;
  title?: string;
}
